Optimal. Leaf size=103 \[ -\frac {a^2 \cos ^5(c+d x)}{10 d}+\frac {a^2 \sin (c+d x) \cos ^3(c+d x)}{8 d}+\frac {3 a^2 \sin (c+d x) \cos (c+d x)}{16 d}+\frac {3 a^2 x}{16}-\frac {\cos ^3(c+d x) (a \sin (c+d x)+a)^3}{6 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.17, antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {2870, 2669, 2635, 8} \[ -\frac {a^2 \cos ^5(c+d x)}{10 d}+\frac {a^2 \sin (c+d x) \cos ^3(c+d x)}{8 d}+\frac {3 a^2 \sin (c+d x) \cos (c+d x)}{16 d}+\frac {3 a^2 x}{16}-\frac {\cos ^3(c+d x) (a \sin (c+d x)+a)^3}{6 a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2635
Rule 2669
Rule 2870
Rubi steps
\begin {align*} \int \cos ^2(c+d x) \sin ^2(c+d x) (a+a \sin (c+d x))^2 \, dx &=-\frac {\cos ^3(c+d x) (a+a \sin (c+d x))^3}{6 a d}+\frac {1}{2} a \int \cos ^4(c+d x) (a+a \sin (c+d x)) \, dx\\ &=-\frac {a^2 \cos ^5(c+d x)}{10 d}-\frac {\cos ^3(c+d x) (a+a \sin (c+d x))^3}{6 a d}+\frac {1}{2} a^2 \int \cos ^4(c+d x) \, dx\\ &=-\frac {a^2 \cos ^5(c+d x)}{10 d}+\frac {a^2 \cos ^3(c+d x) \sin (c+d x)}{8 d}-\frac {\cos ^3(c+d x) (a+a \sin (c+d x))^3}{6 a d}+\frac {1}{8} \left (3 a^2\right ) \int \cos ^2(c+d x) \, dx\\ &=-\frac {a^2 \cos ^5(c+d x)}{10 d}+\frac {3 a^2 \cos (c+d x) \sin (c+d x)}{16 d}+\frac {a^2 \cos ^3(c+d x) \sin (c+d x)}{8 d}-\frac {\cos ^3(c+d x) (a+a \sin (c+d x))^3}{6 a d}+\frac {1}{16} \left (3 a^2\right ) \int 1 \, dx\\ &=\frac {3 a^2 x}{16}-\frac {a^2 \cos ^5(c+d x)}{10 d}+\frac {3 a^2 \cos (c+d x) \sin (c+d x)}{16 d}+\frac {a^2 \cos ^3(c+d x) \sin (c+d x)}{8 d}-\frac {\cos ^3(c+d x) (a+a \sin (c+d x))^3}{6 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.45, size = 76, normalized size = 0.74 \[ \frac {a^2 (-15 \sin (2 (c+d x))-45 \sin (4 (c+d x))+5 \sin (6 (c+d x))-240 \cos (c+d x)-40 \cos (3 (c+d x))+24 \cos (5 (c+d x))+180 c+180 d x)}{960 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.51, size = 85, normalized size = 0.83 \[ \frac {96 \, a^{2} \cos \left (d x + c\right )^{5} - 160 \, a^{2} \cos \left (d x + c\right )^{3} + 45 \, a^{2} d x + 5 \, {\left (8 \, a^{2} \cos \left (d x + c\right )^{5} - 26 \, a^{2} \cos \left (d x + c\right )^{3} + 9 \, a^{2} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{240 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.19, size = 106, normalized size = 1.03 \[ \frac {3}{16} \, a^{2} x + \frac {a^{2} \cos \left (5 \, d x + 5 \, c\right )}{40 \, d} - \frac {a^{2} \cos \left (3 \, d x + 3 \, c\right )}{24 \, d} - \frac {a^{2} \cos \left (d x + c\right )}{4 \, d} + \frac {a^{2} \sin \left (6 \, d x + 6 \, c\right )}{192 \, d} - \frac {3 \, a^{2} \sin \left (4 \, d x + 4 \, c\right )}{64 \, d} - \frac {a^{2} \sin \left (2 \, d x + 2 \, c\right )}{64 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.17, size = 142, normalized size = 1.38 \[ \frac {a^{2} \left (-\frac {\left (\sin ^{3}\left (d x +c \right )\right ) \left (\cos ^{3}\left (d x +c \right )\right )}{6}-\frac {\left (\cos ^{3}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{8}+\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{16}+\frac {d x}{16}+\frac {c}{16}\right )+2 a^{2} \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) \left (\cos ^{3}\left (d x +c \right )\right )}{5}-\frac {2 \left (\cos ^{3}\left (d x +c \right )\right )}{15}\right )+a^{2} \left (-\frac {\left (\cos ^{3}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{4}+\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{8}+\frac {d x}{8}+\frac {c}{8}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.33, size = 93, normalized size = 0.90 \[ \frac {128 \, {\left (3 \, \cos \left (d x + c\right )^{5} - 5 \, \cos \left (d x + c\right )^{3}\right )} a^{2} - 5 \, {\left (4 \, \sin \left (2 \, d x + 2 \, c\right )^{3} - 12 \, d x - 12 \, c + 3 \, \sin \left (4 \, d x + 4 \, c\right )\right )} a^{2} + 30 \, {\left (4 \, d x + 4 \, c - \sin \left (4 \, d x + 4 \, c\right )\right )} a^{2}}{960 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 12.16, size = 257, normalized size = 2.50 \[ \frac {3\,a^2\,x}{16}-\frac {\frac {3\,a^2\,\left (c+d\,x\right )}{16}-\frac {13\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24}-\frac {25\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4}+\frac {25\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}+\frac {13\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{24}-\frac {3\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{8}-\frac {a^2\,\left (45\,c+45\,d\,x-128\right )}{240}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {9\,a^2\,\left (c+d\,x\right )}{8}-\frac {a^2\,\left (270\,c+270\,d\,x-768\right )}{240}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (\frac {15\,a^2\,\left (c+d\,x\right )}{4}-\frac {a^2\,\left (900\,c+900\,d\,x-1280\right )}{240}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,\left (\frac {45\,a^2\,\left (c+d\,x\right )}{16}-\frac {a^2\,\left (675\,c+675\,d\,x-1920\right )}{240}\right )+\frac {3\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8}}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^6} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 4.79, size = 309, normalized size = 3.00 \[ \begin {cases} \frac {a^{2} x \sin ^{6}{\left (c + d x \right )}}{16} + \frac {3 a^{2} x \sin ^{4}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{16} + \frac {a^{2} x \sin ^{4}{\left (c + d x \right )}}{8} + \frac {3 a^{2} x \sin ^{2}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{16} + \frac {a^{2} x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac {a^{2} x \cos ^{6}{\left (c + d x \right )}}{16} + \frac {a^{2} x \cos ^{4}{\left (c + d x \right )}}{8} + \frac {a^{2} \sin ^{5}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{16 d} - \frac {a^{2} \sin ^{3}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{6 d} + \frac {a^{2} \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} - \frac {2 a^{2} \sin ^{2}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{3 d} - \frac {a^{2} \sin {\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{16 d} - \frac {a^{2} \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} - \frac {4 a^{2} \cos ^{5}{\left (c + d x \right )}}{15 d} & \text {for}\: d \neq 0 \\x \left (a \sin {\relax (c )} + a\right )^{2} \sin ^{2}{\relax (c )} \cos ^{2}{\relax (c )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________